import request from '@/utils/request'

// 查询全部的vip信息
export function listVip(query) {
  return request({
    url: '/Vip/findAll',
    method: 'get',
    params: query
  })
}
//拿到全部的顾客信息
export function listCustomer(query) {
  return request({
    url: '/Vip/all',
    method: 'get',
    params: query
  })
}

//查询单个vip的信息，就是查询某个指定的vip
export function queryVipById(eid) {
  return request({
    url: '/Vip/findVipById/' + eid,
    method: 'get',
  })
}

//删除vip的信息
export function delVip(eid) {
  return request({
    url: '/Vip/deleteById/' + eid,
    method: 'delete'
  })
}

//修改vip信息
export function updateVip(data) {
  return request({
    url: '/Vip/updateById',
    method: 'put',
    data: data
  })
}//搜索信息
export function updateAndQuery(eid) {
  return request({
    url: '/Vip/queryVipById/' + eid,
    method: 'get'
  })
}

//添加会员信息
export function addVip(data,id) {
  return request({
    url: '/Vip/addVip/'+id,
    method: 'post',
    data: data
  })
}
